<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
      <%@ taglib prefix="s" uri="/struts-tags"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>沃客营销活动</title>

<script>
//定时器 异步运行
window.onload=function(){
	window.location.href="getCustomerNum";
}
function hello(){

//alert("hello");
window.location.href="getCustomerNum";
var t2 = window.setTimeout("hello()",60000); 
}

var t2 = window.setTimeout("hello()",60000); //定时器
//window.clearTimeout(t2);//去掉定时器
</script>

<script language="JavaScript">
			function startTime()   
			{   
				var today=new Date();//定义日期对象   
				var yyyy = today.getFullYear();//通过日期对象的getFullYear()方法返回年    
				var MM = today.getMonth()+1;//通过日期对象的getMonth()方法返回年    
				var dd = today.getDate();//通过日期对象的getDate()方法返回年     
				var hh=today.getHours();//通过日期对象的getHours方法返回小时   
				var mm=today.getMinutes();//通过日期对象的getMinutes方法返回分钟   
				var ss=today.getSeconds();//通过日期对象的getSeconds方法返回秒   
				// 如果分钟或小时的值小于10，则在其值前加0，比如如果时间是下午3点20分9秒的话，则显示15：20：09   
				MM=checkTime(MM);
				dd=checkTime(dd);
				mm=checkTime(mm);   
				ss=checkTime(ss);    
				var day; //用于保存星期（getDay()方法得到星期编号）
				if(today.getDay()==0)   day   =   "星期日 " 
				if(today.getDay()==1)   day   =   "星期一 " 
				if(today.getDay()==2)   day   =   "星期二 " 
				if(today.getDay()==3)   day   =   "星期三 " 
				if(today.getDay()==4)   day   =   "星期四 " 
				if(today.getDay()==5)   day   =   "星期五 " 
				if(today.getDay()==6)   day   =   "星期六 " 
				document.getElementById('nowDateTimeSpan').innerHTML=yyyy+"-"+MM +"-"+ dd +" " + hh+":"+mm+":"+ss+"   " + day;   
				setTimeout('startTime()',1000);//每一秒中重新加载startTime()方法 
			}   
			
			function checkTime(i)   
			{   
				if (i<10){
					i="0" + i;
				}   
				  return i;
			}  
		</script>

        <style type="text/css">
            *{margin:0;padding:0;}
            ul,li{list-style:none;display:block;}
            #scrollBox{height:450px;width:300px;margin:100px auto;background:#66CCFF;overflow:hidden;}
            #scrollBox #con1,#con2{width:280px;float:left;}
            #scrollBox li{height:15px;line-height:15px;text-align:center;}

        </style>

</head>
<style>
</style>
<body background="images/back.jpg" onload="startTime()">
<h1 style="text-align:center;font-size: 40px;color:#FF6666;margin-top: 25px">欢迎来到常州沃客营销活动现场</h1>
<div style="width: 100%;text-align: center;margin-top: 30px;font-size: 25px"><b><font color="#FFFF66">北京时间：<span id="nowDateTimeSpan"></span></font></b></div>
<div style="margin-left: 1500px;margin-top: 80px;font-family: 微软雅黑;width: 300px">已支付用户名单<b style="color: #FFFF66">(若无您信息,请确认是否支付成功或者与我们工作人员联系)</b></div>
 <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
(function($){

	$.fn.myScroll = function(options){
	//默认配置
	var defaults = {
		speed:40,  //滚动速度,值越大速度越慢
		rowHeight:24 //每行的高度
	};
	
	var opts = $.extend({}, defaults, options),intId = [];
	
	function marquee(obj, step){
	
		obj.find("ul").animate({
			marginTop: '-=1'
		},0,function(){
				var s = Math.abs(parseInt($(this).css("margin-top")));
				if(s >= step){
					$(this).find("li").slice(0, 1).appendTo($(this));
					$(this).css("margin-top", 0);
				}
			});
		}
		
		this.each(function(i){
			var sh = opts["rowHeight"],speed = opts["speed"],_this = $(this);
			intId[i] = setInterval(function(){
				if(_this.find("ul").height()<=_this.height()){
					clearInterval(intId[i]);
				}else{
					marquee(_this, sh);
				}
			}, speed);

			_this.hover(function(){
				clearInterval(intId[i]);
			},function(){
				intId[i] = setInterval(function(){
					if(_this.find("ul").height()<=_this.height()){
						clearInterval(intId[i]);
					}else{
						marquee(_this, sh);
					}
				}, speed);
			});
		
		});

	}

})(jQuery);

$(function(){

	$("div.ranklist").myScroll({
		speed:40,
		rowHeight:24
	});
	
	//xxx
	window.setInterval(function(){
		alert('ok');
		$("#WeiXinImageID").attr("src","http://www.czwkyx.com/WoKeCJ/images/weixin.png?temp=" +  Math.random());//userIconUrl 为图片URL
	},1000); 
	
});
</script>	

<style type="text/css">
*{margin:0;padding:0;list-style-type:none;}
a,img{border:0;}
a,a:visited{color:#5e5e5e; text-decoration:none;}
a:hover{color:#b52725;text-decoration:underline;}
.clear{display:block;overflow:hidden;clear:both;height:0;line-height:0;font-size:0;}
body{font:12px/180% Arial, Helvetica, sans-serif;}
.demo{width:300px;margin:20px auto;border:solid 1px #ddd;padding:0 10px;}
.demo h2{font-size:14px;color:#333;height:30px;line-height:30px;padding:15px 0;color:#3366cc;}
/* ranklist */
.ranklist{height:500px;overflow:hidden;width: 300px}
.ranklist li{height:16px;line-height:16px;overflow:hidden;position:relative;padding:0 70px 0 30px;margin:0 0 10px 0;}
.ranklist li em{background:url(images/mun.gif) no-repeat;width:20px;height:16px;overflow:hidden;display:block;position:absolute;left:0;top:0;text-align:center;font-style:normal;color:#333;}
.ranklist li em{background-position:0 -16px;}
.ranklist li.top em{background-position:0 0;color:#fff;}
.ranklist li .num{position:absolute;right:0;top:0;color:#999;}
</style>

<div class="demo" style="margin-left: 1500px;">
	<h2>沃客营销活动--已支付客户名单</h2>
	<div class="ranklist">
		<ul>
			<s:iterator value="Customerlist" id="list">
				<li class="top">
					<em></em><p><a target="_blank"><s:property value="#list.cusname" /></a></p><span class="num"></span>
				</li>
			</s:iterator>
		</ul>
	</div>
	
</div>
        <div style="margin-top: -550px;margin-left: 50px"><img src="images/alipay.png" style="width: 500px;height: 500px;margin-left: 15px"><img src="images/weixin.png?rand=h9xqeI" id="WeiXinImageID" style="width: 500px;height: 500px;margin-left: 25px">
        	<p style="font-size: 30px;margin-top: 15px"><b style="margin-left: 150px">支付宝支付</b><b style="margin-left: 400px">微信支付</b></p>
        </div>
        <div style="margin-left: 1600px;margin-top:20px;width: 100px;height:40px;color: white;background-color: red;text-align: center;line-height: 40px;border-radius: 60px "><a href="ceshicj.jsp" style="color:white;text-decoration: none;">进入抽奖</a></div>
         <script type="text/javascript">  
                var area =document.getElementById('scrollBox');
                var con1 = document.getElementById('con1');
                var con2 = document.getElementById('con2');
                con2.innerHTML=con1.innerHTML;
                function scrollUp(){
                if(area.scrollTop>=con1.offsetHeight){
                    area.scrollTop=0;
                }else{
                    area.scrollTop++
                }
                }                
                var time = 50;
                var mytimer=setInterval(scrollUp,time);
                area.onmouseover=function(){
                    clearInterval(mytimer);
                }
                area.onmouseout=function(){
                    mytimer=setInterval(scrollUp,time);
                }
        </script>

</body>
</html>